//
//  FourViewController.m
//  UI7_界面间通信课后作业
//
//  Created by dllo on 15/11/17.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "FourViewController.h"
#import "FiveViewController.h"

@interface FourViewController ()<FiveVCDelegate>

@end

@implementation FourViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    self.navigationItem.title = @"第一页";
    self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"下一页" style:UIBarButtonItemStylePlain target:self action:@selector(rightAction:)] autorelease];
    
    
    
    
    
    
    
    
    
}

- (void)changeColor:(UIColor *)color
{
    self.view.backgroundColor = color;
}


- (void)rightAction:(UIBarButtonItem *)sender
{
    FiveViewController *fiveVC = [[FiveViewController alloc] init];
    fiveVC.a = @"oiefjoaiewjf";
    fiveVC.delegate = self;
    [self.navigationController pushViewController:fiveVC animated:YES];
    [fiveVC release];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
